module.exports = app => {
  const { router, controller } = app;

  //todo 登录校验
  router.post('/api/v1/login', controller.v1.login.login);
  // todo 注册的路由 signup
  router.post('/api/v1/signup', controller.v1.login.signup);

  //todo github登录授权 app.passport.authenticate
  const github = app.passport.authenticate('github', { successRedirect: '/' });
  router.get('/api/v1/passport/github', github);
  router.get('/api/v1/passport/github/callback', github);
};
